int lengthOfLongestSubstring(string s) {
	if (s.size() == 0)
		return 0;
	unordered_set<char> exist;
	int left = 0, n = s.size(), max1 = 0;
	for (int i = 0; i < n; i++) {
		while (exist.find(s[i]) != exist.end()) {
			exist.erase(s[left]);
			left++;
		}
		max1 = max(max1, i - left + 1);
		exist.emplace(s[i]);
	}
	return max1;
}